<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>5.原型链</title>
  </head>
  <body>
    <script type="text/javascript" >

      function Dog(name,age){
        // this是Dog的实例对象
        this.name = name
        this.age = age
      }

      let d1 = new Dog('wc',4)

      // console.log(Dog.prototype)
      // console.log(d1.__proto__)
      // console.log(d1.__proto__ === Dog.prototype)

      Dog.prototype.a = 999

      console.log(d1.a)

      console.log(d1 instanceof Dog)


    </script>
  </body>
</html>